import request from "@/utils/request";
import { downloadOfGet } from "@/utils/request";

// 查询应用列表
export function getList(params) {
  return request({
    url: "/deviceLevel/deviceLevel/list",
    method: "get",
    params,
  });
}
// 下拉框
export function getOptionsList(params) {
  return request({
    url: "/levelConfig/levelConfig/list",
    method: "get",
    params,
  });
}

// 保存
export function save(data) {
  return request({
    url: "/deviceLevel/deviceLevel",
    method: "put",
    data,
  });
}
// 删除
export function deleteById(id) {
  return request({
    url: "/deviceLevel/deviceLevel/" + id,
    method: "delete",
  });
}

// 导出
export function exportData(params) {
  return downloadOfGet("/deviceLevel/deviceLevel/export", "设备分级信息表.xlsx",{params});
}
